package Test;
import java.util.*;
public class TimeTaskTest {
      public static void main(String[] args){
      Timer timer = new Timer(); 
      timer.schedule(new Task(), 5 * 1000,5*1000);
    } 
}
class Task extends TimerTask {
public void run()
  {
    System.out.println("定时任务执行");
  }
}
